#include<stdio.h>
int main()
{
	int i = 0;
	int n = 0;
	int ret = 1;
	int b = 0;
	scanf_s("%d", &n);
	for (i = 1; i <= n; i++)
	{
		ret *= i;
		b += ret;
	}
	printf("%d", b);
	
	return 0;
}